﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Pregled_gradovi.aspx.cs" Inherits="Pregled_gradovi" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server" style=" background-image:url('monopoly.png'); height: 895px; width: 895px; text-align: center;">
    <div>
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
            DataFile="~/App_Data/Hoteli.mdb" 
            SelectCommand="SELECT * FROM [Grad]" ></asp:AccessDataSource>
            <asp:GridView ID="GridView1" runat="server" CellPadding="4" 
            ForeColor="#333333" DataSourceID="SqlDataSource1"
        GridLines="None" AutoGenerateColumns="False" DataKeyNames="ID_Grad" 
            EnableModelValidation="True">
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="True" />
            
            <asp:BoundField DataField="ID_Grad" HeaderText="ID_Grad" 
                SortExpression="ID_Grad" />
            <asp:BoundField DataField="ime_na_grad" HeaderText="ime_na_grad" 
                SortExpression="ime_na_grad" />
            <asp:BoundField DataField="boja" HeaderText="boja" 
                SortExpression="boja" />
            
          
        </Columns>
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Gjorgji\Desktop\WebSite1\App_Data\Hoteli.mdb;"  
            ProviderName="System.Data.OleDb" 
            SelectCommand="SELECT ID_Grad,ime_na_grad,boja FROM [Grad]"
            UpdateCommand="UPDATE Grad SET ID_Grad=@ID_Grad, ime_na_grad=@ime_na_grad, boja=@boja WHERE(ID_Grad = @ID_Grad)"
            DeleteCommand="DELETE from Grad WHERE ID_Grad=@ID_Grad"></asp:SqlDataSource>
            </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
